package com.zhang.controller;

import com.zhang.domain.Manager;
import com.zhang.domain.Pay;
import com.zhang.service.IPayService;
import com.zhang.util.AjaxResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author zh
 * @create 2022-03-14 15:27
 */
@RestController
@RequestMapping("pay")
public class PayController {
    @Resource
    private IPayService service;
    @GetMapping
    private AjaxResult getAll(){
        try {
            Map<String, List<Pay>> pays = service.selectPay();
            return AjaxResult.me(pays);
        } catch (Exception e) {
            e.printStackTrace();
            return AjaxResult.me(false,"查询失败");
        }
    }
}
